<?php


class ELVecinoMainClass {
    
    function __construct() {
        
        /** Menu Admin Providers **/
        
        
        require_once(dirname(__FILE__).'/payment-methods/credit-card.php');
        require_once(dirname(__FILE__).'/payment-methods/debit-card.php');
        require_once(dirname(__FILE__).'/payment-methods/cash.php');
        
        add_filter( 'woocommerce_payment_gateways', array($this, 'add_gateways') );
        
        add_action( 'admin_menu', array($this, 'register_menu_page') );
    }
    
    function add_gateways( $methods ) {
        $methods = array();
    	$methods[] = 'Credit_Card_Payment';
        $methods[] = 'Debit_Card_Payment';
        $methods[] = 'Cash_Payment';
    	return $methods;
    }

    function register_menu_page(){
        add_menu_page( __('Providers', 'woothemes'), __('Providers','woothemes'), 'manage_options', 'users.php?role=provider' );
        add_menu_page( __('Cashiers', 'woothemes'), __('Cashiers','woothemes'), 'manage_options', 'users.php?role=cashier' );
    }
    
}

$GLOBALS['elvecino'] = new ELVecinoMainClass();

?>